import http from "../utils/http";
// 获取用户信息
let getUserInfo = ()=>http(`/api/front/user`);
// 获取用户收货地址
let getAddressList = ()=>http(`/api/front/address/list?page=1&limit=20`)
// 设为默认收货地址
let setDefaultAddress = (data)=>http(`/api/front/address/default/set`,data,'post')
// 删除收货地址
let removeAddress = (data)=>http(`/api/front/address/del`,data,'post')
// 添加收货地址
let addAddress = (data)=>http(`/api/front/address/edit`,data,'post');
// 根据收货地址id获取收货地址得详细信息
let getAddressInfo = (id)=>http(`/api/front/address/detail/${id}`)
export {
    getUserInfo,
    getAddressList,
    setDefaultAddress,
    removeAddress,
    addAddress,
    getAddressInfo
}